<!--  -->
<template>
  <div class="cm-toast" v-if="show" :class="[show?'toast-show':'']">
    <div class="toast-icon">
      <svg class="icon" aria-hidden="true">
        <use xlink:href="#icon-cmnews"></use>
      </svg>
    </div>
    <span class="toast-content">{{content}}</span>
  </div>
</template>

<script>
export default {

};
</script>
<style>
.cm-toast {
  position: fixed;
  top:50px;
  padding: 10px 7px;
  min-height: 20px;
  max-width: 18%;
  border-radius: 4px;
  background-color: white;
  margin-top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  transition: all 0.3s;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 15px 25px, rgba(0, 0, 0, 0.05) 0px 5px 10px;
}
.cm-toast>.toast-icon{
    position:absolute;
    left: 15px;
    top: 10px;
}
.cm-toast>.toast-icon>.icon{
    font-size: 16px;
}
.cm-toast>.toast-content{
    position: relative;
    padding-left: 40px;
    padding-right: 13px;
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
    display: block;
}
.toast-show{
    animation: toastenter 0.3s ease;
}
@keyframes toastenter {
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}
</style>